<admintpl file="header" />
<style type="text/css">
.pic-list li {
	margin-bottom: 5px;
}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:U('Maclistadmin/index')}">巡检明细</a></li>
			<li class="active"><a href="" target="_self">{:L('EDIT')}</a></li>
		</ul>
		
			<form method="post" class="form-horizontal js-ajax-form" action="{:U('Maclistadmin/edit_post')}">
					<fieldset>
						<div class="row">
							<div class="span6">
								<div class="control-group">
									<label class="control-label">设备名称</label>
									<div class="controls">
									<select name="sbmc" class="form-control">
										<option value="{$macinfo.sbmc}" selected="selected">{$macinfo.sbmc}</option>
										<volist name="gtype" id="vo">
										<option value="{$vo.type_name}">{$vo.type_name}</option>
										</volist>                                 
									</select>
									</div>					
								</div>
							</div>	
							<div class="span6">
								<div class="control-group">
									<label class="control-label">设备编号</label>
									<div class="controls">
										<input type="text" value="{$macinfo.sbsn}" name="sbsn">
									</div>	
								</div>
							</div>	
						 </div>		
						 <div class="row">
							 <div class="span6">
								<div class="control-group">
									<label class="control-label">坐落位置</label>
									<div class="controls">
										<input type="text" value="{$macinfo.cfdd}" name="cfdd">
									</div>
								</div>
							</div>	
							<div class="span6">
								<div class="control-group">
									<label class="control-label">情况记录</label>
									<div class="controls">
										<input type="text" value="{$macinfo.content}" name="content">
									</div>
								</div>
							</div>	
						</div>		
						<div class="row">
							<div class="span6">
								<div class="control-group">
									<label class="control-label">责任人</label>
									<div class="controls">
										<input type="text" value="{$macinfo.xjr}" name="xjr">
									</div>
								</div>
							</div>	
							<div  class="span6">
								<div class="control-group">
									<label class="control-label">主管审核</label>
									<div class="controls">
										<input type="text" value="{$macinfo.zgsh}" name="zgsh">
									</div>
								</div>
							</div>	
						</div>		
						<div class="row">
							<div class="span6">
								<div class="control-group">
									<label class="control-label">巡检日期</label>
									<div class="controls">
									<input type="text" class="js-datetime" id="input-gzrq"  value="{$macinfo.gzrq}" name="gzrq">
									</div>
								</div>
							</div>							
						</div>	
						<div class="row">
							<div class="span6">
								<div class="control-group">
									<label class="control-label">巡检图片</label>
									<div class="controls">
									<fieldset>
									<legend>图片列表</legend>
									<ul id="photos" class="pic-list unstyled">
										<php>$smeta=json_decode($macinfo['smeta'],true);</php>
										<foreach name="smeta['photo']" item="vo">
										<li id="savedimage{$key}">
											<input type="text" name="photos_url[]" value="{:sp_get_asset_upload_path($vo['url'])}" title="双击查看" style="width: 310px;" ondblclick="image_priview(this.value);" class="input image-url-input"> 
											<input type="text" name="photos_alt[]" value="{$vo.alt}" style="width: 160px;" class="input image-alt-input" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value.replace(' ','') == '') this.value = this.defaultValue;">
											<a href="javascript:flashupload('replace_albums_images', '图片替换','savedimage{$key}',replace_image,'10,gif|jpg|jpeg|png|bmp,0','','','')">替换</a>
											<a href="javascript:remove_div('savedimage{$key}')">移除</a>
										</li>
									    </foreach>										
									</ul>									
									</fieldset>									
									<a href="javascript:;" onclick="javascript:flashupload('albums_images', '图片上传','photos',change_images,'10,gif|jpg|jpeg|png|bmp,0','','','')" class="btn btn-small">选择图片</a>
									</div>
								</div>
							</div>							
						</div>		
					</fieldset>
					<div class="form-actions">
						<button type="submit" class="btn btn-primary js-ajax-submit">提交</button>
						<a class="btn" href="{:U('Maclistadmin/index')}">{:L('BACK')}</a>
					</div>
					<input type="hidden" name="id" value="{$macinfo.id}" />
				</form>
	</div>	
	<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
	<script type="text/javascript" src="__PUBLIC__/js/content_addtop.js"></script>	
	
</body>
</html>